<?php
/**
 * Imports
 */
require_once('Properties.php');

class ConstantsApp
{

	private static $prop = NULL;

	/**
	 * Load the property file.
	 * @return void
	 */
	public static function loadParams()
	{
		self::$prop = new Properties();

		$propertiesFile = "/../Constants.properties";

		self::$prop->load(file_get_contents(dirname(__FILE__) .    $propertiesFile));
		if (self::$prop == NULL)
		{
			throw new Exception("Error loading properties file.");
		}
	}


	public static function getProperty($property)
	{
		if (self::$prop == NULL) {
			self::loadParams();
		}
		return self::$prop->getProperty($property);
	}

	public static function getPropertyBool($property) {
		$b = self::getProperty($property);
		return strtolower($b) === "true";
	}
}
?>